Skip to content

GH-16317: allow __debugInfo() overrides for SplFixedArray subclasses #16544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DanielEScherzer
Copy link
Member

For classes that extend SplFixedArray and define a __debugInfo() magic method, use it.

…sses

For classes that extend `SplFixedArray` and define a `__debugInfo()` magic
method, use it.
@TimWolla
Copy link
Member

I wonder if when touching the code anyway it would make sense to actually implement __debugInfo(), like it is done for e.g. all the random engines, or HashContext (#14644). This would make internal classes behave more similar to userland classes.

@DanielEScherzer
Copy link
Member Author

Maybe we should add something to php/php-tasks for going through and adding that to every internal class? Right now I just want to get the subclasses to work, I'm not entirely sure what each parent class (SplFixedArray, in this case) should be returning

@Girgias
Copy link
Member

Girgias commented Oct 23, 2024

I think the "issue" is that there exists an object handler when it probably should not even be called and a proper __debugInfo() method be implemented which does the same thing.

And this would align the behaviour of internal and userland classes more like @TimWolla already mentionned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants